﻿#ifndef CAMERAWORKER_H
#define CAMERAWORKER_H

#include <QObject>
#include <QDebug>
#include "VimbaApi/ApiController.h"
#include "VimbaImageTransform/Include/VmbTransform.h"
#include "Common/common.h"
using namespace AVT::VmbAPI;
using namespace AVT::VmbAPI::Examples;
using AVT::VmbAPI::FramePtr;
using AVT::VmbAPI::CameraPtrVector;

class CameraWorker : public QObject
{
    Q_OBJECT
public:
    explicit CameraWorker(QObject *parent = nullptr);
    ~CameraWorker();
    ApiController* m_ApiController;
    bool m_bIsStreaming;
    VmbUchar_t *pBuffer;
    CameraData m_cData;
    uchar *dataGray;
    uchar *dateR;
    uchar *dateG;
    uchar *dateB;
    Ui::MainWindow * m_tUi;
    int m_nIndex;

    int m_nWidth;
    int m_nHeight;
signals:
    void sigAlgStart(CameraData m_cImageInfo);
public slots :
    void Initialize();
    void start();
    void stop();
    // Frame
    void OnFrameReady(int status);
};

#endif // CAMERAWORKER_H
